home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 4
/
The 640 Meg Shareware Studio CD-ROM Volume IV (Data Express)(1994).ISO
/
clang
/
mtool100.zip
/
MTOOL.DOC
< prev
next >
Wrap
Text File
|
1993-05-25
|
37KB
|
875 lines
Tools for Software Programmers
MTOOL (Mark's Tools)
Version 1.00 - May 18, 1993
U S E R S M A N U A L
Mark K. Mathews
15 Dunstan Road
Lynnfield, MA. 01940
617-334-3910
Copyright (c) 1989-1993 by Mark K. Mathews
This version of the documentation, software and copyright
supersedes all previous versions of MTOOL.
Specifications subject to change without notice.
TABLE OF CONTENTS
INTRODUCTION 1
System Requirements 1
License 1
BBS Sysops 1
Disk Distributors 2
Disclaimer of Warranty 2
Trademarks 2
Ordering Information 2
Order Form 3
Chapter 1 Getting Started 4
Installing MTOOL 4
Chapter 2 MTOOL (MAIN MENU) 5
How to use Menus 5
How to select objects 5
Icon Editor 5
Mouse Editor 5
Files Menu 6
Get Info... 6
DOS shell 6
Quit 6
Help Menu 6
Help! 6
About 6
Chapter 3 ICON EDITOR 7
Editing Images 7
Selecting Colors 7
Files Menu 7
Open... 7
New... 8
Save 9
Save As... 9
Get Info 9
DOS shell 9
Quit 9
Help Menu 9
Help! 9
About... 9
Image Button Functions 9
Reset 9
Clear 9
Fill 9
Invert 9
Flip H 9
Flip V 9
Rotate +90 10
Rotate -90 10
Width- 10
Width+ 10
Height- 10
Height+ 10
Move < 10
Move > 10
Move ^ 10
Move v 10
Resize 10
.BIT File Format 11
ii
Chapter 4 MOUSE EDITOR 12
How to Edit Mouse Cursors 12
Selecting Colors 12
Files Menu 12
Open... 12
New... 12
Save 12
Save As... 12
Get Info 12
DOS shell 12
Quit 12
Screen Mask Menu 12
Clear 12
Fill 12
Invert 12
Horizontal Flip 13
Vertical Flip 13
Rotate Plus 90 Degrees 13
Rotate Minus 90 Degrees 13
Copy Cursor Mask 13
Quick Outline F5 13
Cursor Mask Menu 13
Clear 13
Fill 13
Invert 13
Horizontal Flip 13
Vertical Flip 13
Rotate Plus 90 Degrees 14
Rotate Minus 90 Degrees 14
Copy Cursor Mask 14
Set Cursor Hot Spot 14
Help Menu 14
Help! 14
About... 14
Mouse Buttons 14
Test Data F7 14
Reset Mouse F8 14
.MOU File Format 15
1
INTRODUCTION
MTOOL provides two tools for programmer's: a MOUSE CURSOR editor
and a ICON EDITOR. The MOUSE CURSOR editor lets you edit each pixel of
a mouse cursor to form any shape you wish. The final mouse cursor is
saved as an unsigned integer array in an ASCII file on disk. The mouse
cursor file is then compiled and linked to your program. Some of the
MOUSE CURSOR features are: load, save, rotate, invert, flip, set mouse
cursor hotspot and test mouse cursor. The ICON editor lets you edit
each pixel of an image up to 64 x 64 pixels in 16 colors. The final
image is saved as a char far * array in an ASCII file on disk. The
icon image file is then compiled and linked to your program and can be
used by putimage() (putimage() is a function in Borland's Turbo C,
Turbo C++, and Borland C++). Some of the ICON EDITOR features are:
load, save, rotate, invert, flip, resize and move image.
System Requirements
MTOOL runs on the IBM PC compatible family of computers, including
AT and PS/2, along with all true IBM compatible 286, 386, and 486
computers. MTOOL requires:
1) DOS 3.31 or higher and requires a minimum of 350K of memory.
2) a Microsoft compatible mouse.
3) a VGA color monitor( 640 x 480 16 color).
4) MTOOL can run on either a hard disk or a floppy drive.
License
This version of MTOOL is NOT public domain or free software, but is
being distributed as "shareware". Non-registered users of this software
are granted a limited license to make an evaluation copy for trial use
on a private, non-commercial basis, for the express purpose of
determining whether MTOOL is suitable for their needs. At the end of
this trial period, you should either register your copy or discontinue
using MTOOL. What does this mean to you? If you use this program, then
you should pay for your copy. That way the author, Mark K. Mathews,
will be able to provide you support and updates, and stay in business.
Plus, registered users receive additional ICON image files, MOUSE CURSOR
files, programming examples, and technical support.
A MTOOL registration entitles you to use the program on ONLY one
computer. All users are granted a limited license to copy MTOOL only
for the trial use of others and subject to the above limitations. This
license does NOT include distribution or copying of this software
package in connection with any other product or service, or for general
use within a company or institution.
BBS Sysops
Operators of electronic bulletin board systems (Sysops) are
encouraged to post this program for downloading by their users, as long
as the above conditions are met.
2
Disk Distributors
Disk distributors, i.e. companies that charge a nominal fee for the
copying and mailing of diskettes listed in their catalogs, do not pay
any part of that fee to the author. The author in turn does not pay any
listing fees for getting the program into the distributor's catalogs.
Disclaimer of Warranty
THIS SOFTWARE AND MANUAL ARE SOLD "AS IS" AND WITHOUT WARRANTIES AS
TO PERFORMANCE OR MERCHANTABILITY. THE SELLER'S SALESPERSONS MAY HAVE
MADE STATEMENTS ABOUT THIS SOFTWARE. ANY SUCH STATEMENTS DO NOT
CONSTITUTE WARRANTIES AND SHALL NOT BE RELIED ON BY THE BUYER IN
DECIDING WHETHER TO PURCHASE THIS PROGRAM. THIS PROGRAM IS SOLD WITHOUT
ANY EXPRESS OR IMPLIED WARRANTIES WHATSOEVER. BECAUSE OF THE DIVERSITY
OF CONDITIONS AND HARDWARE UNDER WHICH THIS PROGRAM MAY BE USED, NO
WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED. THE USER IS
ADVISED TO TEST THE PROGRAM THOROUGHLY BEFORE RELYING ON IT. THE USER
MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY LIABILITY OF
SELLER OR MANUFACTURER WILL BE LIMITED TO PRODUCT REPLACEMENT OR REFUND
OF PURCHASE PRICE.
The author is committed to supporting this program, so he will
repair reported problems and issue upgraded programs as quickly as
possible after problem reports are received.
Trademarks
MS/DOS is a registered trademark of Microsoft Corporation.
PC/DOS is a registered trademark of IBM Corporation.
IBM is a registered trademark of International Business Machines Corp.
Turbo C, Turbo C++, and Borland C++ are registered trademarks of
Borland International, Inc.
Pkzip and Pkunzip are registered trademarks of PKWARE, Inc.
Ordering Information
A MTOOL registration licenses you to use the program on a regular
basis. Registration includes latest version of program along with
additional ICON files, MOUSE CURSOR files, programming examples and
technical support. Individual registrations for MTOOL costs $35 (plus
$1.50 shipping). The latest MTOOL diskette will be sent along with a
documentation file on the disk.
3
Order Form
ORDER FORM
Date:__________________________
Remit to: Mark K Mathews
MTOOL
15 Dunstan Road
Lynnfield MA 01940
USA
Please enter following order:
____ MTOOL Registration ..................... @ $35.00 ea $________
(Includes latest version of the program diskette with
documentation and examples).
Shipping ........................................... $________
(U.S. and Canada, $1.50; All Other Countries, $10.00)
Subtotal $________
____ Massachusetts Residents please add Sales Tax @ 5% $________
Total (U.S.Funds) $________
drawn on U.S.Bank
Diskette ________ 5 1/4 360K ________ 3 1/2 720K
Enclosed Please find a check for $______________
Name _________________________________________________________
Company _________________________________________________________
Address _________________________________________________________
_________________________________________________________
_________________________________________________________
Day Phone: ______________________ Evening: ______________________
Prices are good until December 1993.
4
Chapter 1 Getting Started
The MTOOL program is distributed in a .ZIP file and are compressed
using the utility PKZIP. Program and data files are decompressed using
PKUNZIP and placed into the users directory.
The files in MTOOL1.ZIP:
FILE_ID.DIZ Definition of MTOOL
MTOOL.DOC MTOOL Documentation
MTOOL.HIS MTOOL History
MTOOL.EXE MTOOL main program
BEACH.BIT Example developed with ICON EDITOR
MUSHROOM.BIT Example developed with ICON EDITOR
ARROW.MOU Example developed with MOUSE EDITOR
RHAND.MOU Example developed with MOUSE EDITOR
ORDER.FRM Order form for registration of MTOOL.
Installing MTOOL
1) Copy MTOOL1.ZIP to the directory you want MTOOL to be located.
2) Type "PKUNZIP *.ZIP" to unpack MTOOL1.ZIP.
3) To run, type "MTOOL".
5
Chapter 2 MTOOL (MAIN MENU)
How to use Menus
There are three ways to select a menu command:
1) Press F10, then use the arrow keys to go to the menu you want and use
the down arrow to show the menu commands. Use the arrow keys to select
the command. Press Enter to choose the selected command.
2) Press Alt and the underlined letter of the menu you want (such as
Alt+F for the File menu), use the arrow keys to select a command, then
press Enter to choose that command.
3) Press Alt and the underlined letter of the menu you want (such as
Alt+F for the File menu), then press Alt and the underlined letter of the
command you want (such as Alt+G for the Get Info menu option). You can
also press the underlined letter of a menu name or command instead of
using the arrow keys. Or Click the title of the menu you want to pull
down, then click the menu command you want to choose.
The highlighted menu title is the currently selected menu.
Menu commands are followed by either an ellipsis mark (...) or a hot
key.
Mark │ Name │ What the Menu Command Does
─────┼──────────┼────────────────────────────
... │ Ellipsis │ Brings up a dialog box
│ │
F4 │ Hot key │ Initiates some action when
│ │ you choose that command or
│ │ press the specified hot key
How to select objects
To select any one of a group of objects (i.e. Input Box, Directory
list, Buttons) in a dialog window you can:
- click with the mouse
- press TAB key or SHIFT TAB key
- ALT key with the underlined letter in the title of the object.
Icon Editor
To EXECUTE the Icon Editor press F2 on the keyboard or use the left
button of the mouse and click on the button titled "Icon Editor F2".
Mouse Editor
To EXECUTE the Mouse Editor press F3 on the keyboard or use the left
button of the mouse and click on the button titled "Mouse Editor F3".
6
Files Menu
Get Info...
To execute Get Info, press ALT+F and then ALT+G. A dialog window
will appear to show the working directory, filename, image name, and how
much of conventional memory is left.
NOTE: If a tool is used and then you return to the MAIN MENU, filename
and imagename will show the last name used. This will indicate the last
tool used.
Icon Editor uses .BIT files
Mouse Editor uses .MOU files
DOS shell
To execute DOS shell, press ALT+F and then ALT+D. The current work
is saved and you are returned to the DOS prompt. To return to MTOOL type
EXIT and then press ENTER key. You are returned to MTOOL and any current
work is loaded.
Quit
To quit to MTOOL perform one of the following:
1) Type ALT+F then ALT+Q.
2) Or press ALT+X.
3) Or click on the button titled "Exit MTOOL Alt X".
NOTE: If you are using one of the tools, using steps 1 or 2 above returns
you to the MAIN MENU.
Help Menu
Help!
To execute Help!, press ALT+H and then ALT+H or F1 key. A dialog
box appears with a menu of Hot keys for the menu. To exit About...:
- Press Esc or Enter key, or
- Click OK button.
About
To execute About..., press ALT+H and then ALT+A. A dialog box
appears, showing Mark K. Mathews copyright and version information of
MTOOL. To exit About...:
- Press Esc or Enter key, or
- Click OK button.
7
Chapter 3 ICON EDITOR
Editing Images
Place the mouse cursor within the large view of the image and click
with the left button on any pixel block. You can also press and hold
the left button while moving from pixel to pixel.
If you select LINE, ELLIPSE, CIRCLE, or RECTANGLE button, you
can resize the figure by holding down the RIGHT MOUSE BUTTON and
move the mouse. Then you position the figure and press the LEFT
MOUSE BUTTON to draw the figure.
Selecting Colors
A menu of 16 colors is located on the right side of the screen.
Simply click on any color and that is your drawing color.
Files Menu
Open...
To execute Open.., press ALT+F and then ALT+O or press F3. A dialog
window will appear to show a File Name input box, directory list with
scrollbar, Open button, Cancel button and FIle info box. The procedure
in Opening a file is as follows:
1) The File Name input box will have a wildcard name ( for example,
*.MOU). In the File Name input box, you can do the following:
File Name
-
┌──────────┐
│*.mou_ │
└──────────┘
a) Leave the wildcard name in the input box and press the Enter key.
The directory list will be updated with directory names and any files
ending with the same extension.
b) Enter a file name with or without the extension and press the Enter
key. The directory list is updated and if the file name is found, the
dialog window will disappear and the program will attempt to open the
file.
8
2) The Directory List will show all directories and files relative to the
current directory. The first directory name of file name is highlighted.
In the Directory List, you can do the following:
Directory
-
┌──────────────┬──────────────┬─┐
│ ..\ │ │^│
│ ARROW.MOU │ ├─┤
│ LHAND.MOU │ │ │
│ TREE.MOU │ │ │
│ │ │ │
│ │ │ │
│ │ ├─┤
│ │ │v│
└──────────────┴──────────────┴─┘
a) Select a file name by clicking with a mouse and then click on the Open
button. Or use the arrow keys and then press Enter key.
b) To change directory with mouse double click on directory name. To
change directory with keyboard, select directory name with arrow keys and
press Enter Key. The new directory will only stay selected after a file
is properly loaded. Otherwise, it return to the previous directory.
4) The Files info box lists the names of files in the current directory
that match the file name in the File Name input box, plus the parent
directory and all subdirectories.
┌──────────────────────────────────────────┐
│ C:\COSA\BIN\*.CPP │
│ ARROW.MOU 352 Oct 20,1991 12:00pm │
└──────────────────────────────────────────┘
The File Info box shows the path name, file name, date, time, and size of
the selected file. As you scroll through the directory list , the info
box is updated for each file. You cannot select any of the items on this
information panel.
3) To cancel Open a file, click on the Open button or use the ALT +
underlined letter of the button title combination.
New...
To execute New.., press ALT+F and then ALT+N. A dialog window will
appear to show a filename, image name, OK button and Cancel button. The
first time you execute New... the following steps are performed:
1) The filename input box is on with a cursor at the end. You can enter
a filename ( 12 characters max. ) with extension. Then press Enter key
to go to the image name edit line.
2) The image name input box is on with a cursor at the end. You can
enter an image name ( up to 32 characters). Then press Enter key and the
OK button will be down.
3) With the OK button down, press Enter key once more and the New..
dialog window will disappear. The name of the file will now appear at
the top of the large window.
9
Save
To execute Save, press ALT+F and then ALT+S. The working file is
saved in the current working directory. Save function DOES NOT check for
existing file.
Save As...
To execute Save As.., press ALT+F and then ALT+A. See Open... (Open
A File) for information.
Get Info
See MTOOL FUNCTIONS (MAIN MENU) for information.
DOS shell
See MTOOL FUNCTIONS (MAIN MENU) for information.
Quit
See MTOOL FUNCTIONS (MAIN MENU) for information.
Help Menu
Help!
See MTOOL FUNCTIONS (MAIN MENU) for information.
About...
See MTOOL FUNCTIONS (MAIN MENU) for information.
Image Button Functions
All Image Buttons are executed by clicking with the mouse only.
Reset
Reset function resets the image to the maximum size of 64 x 64
pixels. The current work is saved and then redisplayed.
Clear
The current work is cleared and all pixels are change to WHITE
color.
Fill
The entire image is filled with the current drawing color.
Invert
The entire image is inverted.
Flip H
The entire image is flipped horizontally ( top to bottom).
Flip V
The entire image is flipped vertically (side to side).
10
Rotate +90
The entire image is flipped clockwise by 90 degrees. If the image
is NOT square, the array is squared to the larger number of columns or
rows and then rotated clockwise
Rotate -90
The entire image is flipped counter-clockwise by 90 degrees. If the
image is NOT square, the array is squared to the largest columns or rows;
and then rotated counter-clockwise.
Width-
The array is decreased by 1 col of pixels from the right. If the
right most column contains a part of the image and Width- is executed,
that column image info is NOT saved.
Width+
The array is increased by 1 col of pixels from the right.
Height-
The array is decreased by 1 row of pixels from the bottom. If the
bottom row contains a part of the image and Height- is executed, that row
image info is NOT saved.
Height+
The array is increased by 1 row of pixels from the bottom.
Move <
The entire image is moved to the left by one column. The image is
wrapped around from the left column to the right column.
Move >
The entire image is moved to the right by one column. The image is
wrapped around from the right column to the left column.
Move ^
The entire image is moved to the up by one row. The image is
wrapped around from the top row to the bottom row.
Move v
The entire image is moved to the down by one row. The image is
wrapped around from the bottom row to the top row.
Resize
A dialog box appears with the current array size in row and columns.
The Row edit box is first activated and you can type a 2 digit number
(max is 64). Press Enter key to activate the Columns edit box and enter
a 2 digit number. Press Enter key and the OK button is activated.
Pressing Enter key once more and the dialog box disappears and the new
array is redrawn. CAUTION: If the image is larger then the new array
size, that part of the image is NOT saved. The best way is to move the
image to the upper left hand corner and then resize the array.
11
.BIT File Format
Shown below is an example of a .BIT file used by ICON Editor:
//BGI 15 15 126
char far* ball =
"\x0E\x00\x0E\x00\xFF\xFE\xFF\xFE\xFF\xFE\xFF\xFE\xFC\x7E\xFC\x7E\xFF\xFE
"
"\xFF\xFE\xF0\x1E\xF0\x1E\xFF\xFE\xFF\xFE\xE0\x0E\xE0\x0E\xFF\xFE\xFF\xFE
"
"\xC0\x06\xC3\x06\xFC\xFE\xFC\xFE\xC0\x06\xC6\x06\xF9\xFE\xF9\xFE\x80\x02
"
"\x8C\x02\xF3\xFE\xF3\xFE\x80\x02\x80\x02\xFF\xFE\xFF\xFE\x80\x02\x80\x02
"
"\xFF\xFE\xFF\xFE\xC0\x06\xC0\x66\xFF\x9E\xFF\x9E\xC0\x06\xC0\x46\xFF\xBE
"
"\xFF\xBE\xE0\x0E\xE0\xCE\xFF\x3E\xFF\x3E\xF0\x1E\xF0\x1E\xFF\xFE\xFF\xFE
"
"\xFC\x7E\xFC\x7E\xFF\xFE\xFF\xFE\xFF\xFE\xFF\xFE\xFF\xFE\xFF\xFE\x00\x00
"
;
Line 1 //BGI 15 15 126
─┬─ ┬ ┬ ┬
│ │ │ └────── Size of char far * array
File I.D. │ └───┐
│ │
Rows x Columns
Line 3-XXXX char far* array used by putimage()
12
Chapter 4 MOUSE EDITOR
How to Edit Mouse Cursors
Place the mouse cursor within the large view of the image and
click with the left button on any pixel block. You can also press
and hold the left button while moving from pixel to pixel.
Selecting Colors
A menu of 2 colors is located on the right side of the screen.
Simply click on any color and that is your drawing color.
Files Menu
Open...
See ICON EDITOR, Files Menu, Open.. for information.
New...
See ICON EDITOR, Files Menu, New.. for information.
Save
See ICON EDITOR, Files Menu, Save for information.
Save As...
See ICON EDITOR, Files Menu, Open.. for information.
Get Info
See MTOOL FUNCTIONS (MAIN MENU) for information.
DOS shell
See MTOOL FUNCTIONS (MAIN MENU) for information.
Quit
See MTOOL FUNCTIONS (MAIN MENU) for information.
Screen Mask Menu
Clear
To execute press ALT+S and then ALT+C. Clears Screen Mask image to
WHITE.
Fill
To execute press ALT+S and then ALT+F. Fills Screen Mask image with
current color.
Invert
To execute press ALT+S and then ALT+I. Inverts Screen Mask image.
13
Horizontal Flip
To execute press ALT+S and then ALT+H. Performs a horizontal flip
(Top<->Bottom) on Screen Mask image.
Vertical Flip
To execute press ALT+S and then ALT+V. Performs a vertical flip
(Left<->Right) on Screen Mask image.
Rotate Plus 90 Degrees
To execute press ALT+S and then ALT+P. Rotates Screen Mask image 90
degrees clockwise.
Rotate Minus 90 Degrees
To execute press ALT+S and then ALT+M. Rotates Screen Mask image 90
degrees counter-clockwise.
Copy Cursor Mask
To execute press ALT+S and then ALT+O. Makes a copy of Cursor Mask
image.
Quick Outline F5
To execute press ALT+S and then ALT+Q or press F5 key. Draws an
outline of the current Cursor Mask. This function is only used when a
mouse Cursor Mask is a BLACK image on WHITE background. This function
then makes a copy Cursor Mask to Screen Mask, Inverts the Screen mask,
and makes an outline of the Cursor mask image. This results in a WHITE
image on a BLACK background.
Cursor Mask Menu
Clear
To execute press ALT+C and then ALT+C. Clears Cursor Mask image to
WHITE.
Fill
To execute press ALT+C and then ALT+F. Fills Cursor Mask image
with current color.
Invert
To execute press ALT+C and then ALT+I. Inverts Cursor Mask image.
Horizontal Flip
To execute press ALT+C and then ALT+H. Performs a horizontal flip
(Top<->Bottom) on Cursor Mask image.
Vertical Flip
To execute press ALT+C and then ALT+V. Performs a vertical flip
(Left<->Right) on Cursor Mask image.
14
Rotate Plus 90 Degrees
To execute press ALT+C and then ALT+P. Rotates Cursor Mask image 90
degrees clockwise.
Rotate Minus 90 Degrees
To execute press ALT+C and then ALT+M. Rotates Cursor Mask image 90
degrees counter-clockwise.
Copy Cursor Mask
To execute press ALT+C and then ALT+O. Makes a copy of Screen Mask
image.
Set Cursor Hot Spot
To execute press ALT+C and then ALT+S. Sets Mouse Cursor Hot Spot.
This "hot spot" (a pixel point of a mouse cursor used to click an exact
position on the screen) can be tested by clicking on Test Data button or
pressing F7.
Help Menu
Help!
See MTOOL FUNCTIONS (MAIN MENU) for information.
About...
See MTOOL FUNCTIONS (MAIN MENU) for information.
Mouse Buttons
Test Data F7
To execute press ALT+T or click on Test Data button or press F7
key. Changes the default "arrow" mouse cursor to the current
Screen+Cursor Mask data. You can use the new mouse cursor until Reset
Mouse Button is executed or you quit Mouse Editor.
Reset Mouse F8
To execute press ALT+R or click on Reset Mouse button or press F8
key. Resets mouse cursor back to default "arrow" mouse cursor.
15
.MOU File Format
Shown below is a sample of a .MOU file used by Mouse Editor:
//MOUSE
//CURSOR HOTPOINTS X= 00 Y= 00
unsigned int arrow [32]= {
0X7FFF, 0X3FFF, 0X1FFF, 0X0FFF, 0X07FF, 0X03FF, 0X01FF, 0X00FF,
0X007F, 0X003F, 0X003F, 0X01FF, 0X01FF, 0X30FF, 0XF0FF, 0XF0FF,
0X0000, 0X0000, 0X4000, 0X6000, 0X7000, 0X7800, 0X7C00, 0X7E00,
0X7F00, 0X7F80, 0X7C00, 0X6C00, 0X4C00, 0X0600, 0X0600, 0X0000,
};
Line 1 Header I.D. (Mouse Editor checks for this!)
Line 2 //CURSOR HOTPOINTS X=00 Y= 00
───────┬────────── ────┬─────
│ │
│ │
I.D. of (X,Y) └───── Mouse Cursor Hotpoints
Line 3-8 unsigned int array used by int 33h Mouse Function 9